
#include <iostream>

class printer
{
public:
    void print(int x) { std::cout << x << std::endl; }
};

class calculator
{
public:
    virtual int solve(int x, int y) {}
};

class adder : public calculator
{
public:
    int solve(int x, int y) { return x + y; }
};

class solver
{
private:
    printer Pri;

public:
    void print(int x) { Pri.print(x); }
    int accept(int x, int y, calculator c) { c.solve(x, y); }
};

int main()
{
    solver Solver;
    adder Adder;
    int tmp = Solver.accept(114514, 1919810, Adder);
    std::cout << tmp << std::endl;
}